from api.base import Base

class SchoolCharge(Base):

    def add_school(self,token,account,name,countyid,password,type):
        """
        添加学校
        :param token:token值
        :param account: 学校账号
        :param name: 学校名称
        :param parentId: 学校上级id
        :param password: 密码
        :param type: 账号类型
        :return:
        """
        p_data = {"token": token, "account":account, "name":name, "parentId": countyid, "password": password,
                  "type": type}
        resp=self.send_api_data('schoolcharge_api_path', p_data, "add_school")
        return resp


    def delete_school(self,token,id):
        """
        删除学校
        :param token:token值
        :param id: 学校id
        :return:
        """
        p_data ={"token":token,"id":id}
        resp = self.send_api_data('schoolcharge_api_path', p_data, "delete_school")
        return resp

    def find_school(self):
        pass

    def updata_school(self):
        pass




if __name__ == '__main__':
    SchoolCharge().add_school()
